<script lang="jsx">
/**
 * @author lilinjie
 * @Description:
 */

import { defineComponent } from 'vue'

export default defineComponent({
  name: 'Status',
  props: {
    status: {
      type: Number,
      default: 0
    }
  },
  setup(props) {
    const statusMap = {
      0: '初级销售',
      1: '中级销售',
      2: '高级销售',
      3: '店长',
    }
    return () => {
      return (
          <span class={`status-${props.status}`}>{statusMap[props.status]}</span>
      )
    }
  }
})
</script>
<style lang="less" scoped>
.status-0,
.status-1,
.status-2,
.status-3 {
  display: inline-block;
  //width: 100px;
  //height: 20px;
  line-height: 20px;
  padding: 2px 10px;
  text-align: center;
  border-radius: 8px;
  //background-color: #4caf50;
  color: #fff;
  font-size: 12px;
}
.status-2 {
  background-color: #4caf50;
}
.status-1 {
  background-color: #2196f3;
}
.status-3 {
  background-color: #ff9800;
}
.status-0 {
  background-color: gray;
}
</style>
